package com.cn.mtm2000.mtmmedicalthymeleaf;



import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class TestThymeleafController {


    @RequestMapping(value = "/testThymeleaf",method = RequestMethod.GET)
    public String hello(Model model) {
        model.addAttribute("name", "Dear");
        return "/hello";
    }

    @RequestMapping("/school")
    public ModelAndView school(){
        ModelAndView mv=new ModelAndView();
        mv.addObject("school","888888");
        mv.setViewName("/school");
        return mv;
    }

}
